package com.ys.peony.rolecontrol.entity;

import com.ys.peony.app.YSConstant;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by 59153 on 2017/9/22.
 */
@Entity
public class Widget {
    public final static int LEVEL1 = 1;
    public final static int LEVEL2 = 2;
    public final static int LEVEL3 = 3;
    public final static String BLOCK = "block";
    public final static String TOP = "top";
    public final static String BOTTOM = "bottom";
    @Id(autoincrement = true)
    private Long wid;
    private String rule = ""; //布局规则
    private String type = "";
    private String id = ""; //id
    private int level = YSConstant.INVALID; //控件对应层级
    private long blockId; //对应区块id
    @Generated(hash = 693399754)
    public Widget(Long wid, String rule, String type, String id, int level,
            long blockId) {
        this.wid = wid;
        this.rule = rule;
        this.type = type;
        this.id = id;
        this.level = level;
        this.blockId = blockId;
    }
    @Generated(hash = 938966889)
    public Widget() {
    }
    public Long getWid() {
        return this.wid;
    }
    public void setWid(Long wid) {
        this.wid = wid;
    }
    public String getRule() {
        return this.rule;
    }
    public void setRule(String rule) {
        this.rule = rule;
    }
    public String getType() {
        return this.type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getId() {
        return this.id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public int getLevel() {
        return this.level;
    }
    public void setLevel(int level) {
        this.level = level;
    }
    public long getBlockId() {
        return this.blockId;
    }
    public void setBlockId(long blockId) {
        this.blockId = blockId;
    }
}
